## Description of files for Supplementary Material associated with manuscript
## submitted to Canadian Journal of Forest Research
## Title: Hierarchical Bayesian models for small area estimation of 
## 	  county-level private forest landowner population
## DOI: 10.1139/cjfr-2017-0154
## Authors: Neil R. Ver Planck*, Andrew O. Finley, and Emily S. Huff
## *Corresponding author email: verplan6@msu.edu


## All files should be placed in the same directory

## A first option is to run the scripts in the following sequential order:
## 1) models.R, 2) FH-summary.R; 3) FHCAR-summary.R

## A second option is to run the scripts via the R Markdown file: main.Rmd
## with the associated output generated as: main.pdf

##---------------
## Data Image
##---------------
data.RData
	R image of needed objects for fitting SAE models for one iteration of Montana and New Jersey
		dat: data frame containing the 750th iteration for Montana and the 350th iteration for New Jersey
				with columns for STATE, COUNTYNUMB, NAME, iterate, n, Y.i, sigma.sq.i
			STATE: character value of MT for Montana and NJ for New Jersey
			COUNTYNUMB: integer value for county identifier
			NAME: character value for the county
			iterate: iteration number from the 1000 repeated samples
			n: fixed sample size for each county
			Y.i: direct estimate of private forest ownerships for the county
			sigma.sq.i : direct estimate sampling variance
		R.mt: neighborhood matrix for Montana
		R.nj: neighborhood matrix for New Jersey
		X: data frame containing the covariates of POPDEN2010 and Forest.ha by STATE and COUNTYNUMB
			POPDEN2010: numeric value for number of people per square kilometer
			Forest.ha: total forest area in the county
		Ytrue: data frame of Y.T by STATE and COUNTYNUMB
			Y.T: numeric value of derived "true" private forest ownership total population size

##------------------------------------
## Small Area Estimation (SAE) Models
##------------------------------------
FH.R
	R function for Fay-Herriot SAE model
	sourced in models.R script	

FHCAR.R
	R function for Fay-Herriot with conditional autoregressive prior (FHCAR) SAE model
	sourced in models.R script

##----------------
## Scripts to Run
##----------------
1) models.R
	script to fit the SAE models to the Montana and New Jersey data for a single iteration


2) FH-summary.R
	script to summarize the FH model outputs


3) FHCAR-summary.R
	script to summarize the FHCAR model outputs